package com.leaves.core.validation.date;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @Author Chenweiwei
 * @Date 2021/11/9 19:55
 * @Version 1.0
 */

@Documented
@Constraint(validatedBy = SelfDateValueValidator.class)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface SelfDateValue {

    String message();

    String dateFormat();

    Class[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    @Target({ElementType.FIELD, ElementType.PARAMETER})
    @Retention(RUNTIME)
    @Documented
    @interface List {
        SelfDateValue[] value();
    }


}
